home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act5 / 00110.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  1.4 KB  |  46 lines

  1. on exitFrame
  2.   global blist, rlist, licklist
  3.   set licklist to ["blue r ", "red r ", "pink r ", "green r "]
  4.   repeat while the soundBusy of 1
  5.     set zlist to []
  6.     repeat with rrr = 1 to 2
  7.       set stub to random(7) + 6
  8.       repeat while (getPos(zlist, stub) > 0) or (getAt(blist, stub - 6) = 0)
  9.         set stub to stub + 1
  10.         if stub > 14 then
  11.           set stub to 7
  12.         end if
  13.         setAt(blist, stub - 6, the number of cast (getAt(licklist, random(4)) & "1") - 1)
  14.       end repeat
  15.       add(zlist, stub)
  16.     end repeat
  17.     repeat with yyy = 1 to 2
  18.       repeat with listsub = 1 to 2
  19.         set zzz to getAt(zlist, listsub)
  20.         if getAt(blist, zzz - 6) <> 0 then
  21.           set the castNum of sprite zzz to getAt(blist, zzz - 6) + yyy
  22.         end if
  23.       end repeat
  24.       updateStage()
  25.       mydelay(15)
  26.     end repeat
  27.     repeat with yyy = 2 down to 1
  28.       repeat with listsub = 1 to 2
  29.         set zzz to getAt(zlist, listsub)
  30.         if getAt(blist, zzz - 6) <> 0 then
  31.           set the castNum of sprite zzz to getAt(blist, zzz - 6) + yyy
  32.         end if
  33.       end repeat
  34.       updateStage()
  35.       mydelay(15)
  36.     end repeat
  37.     repeat with listsub = 1 to 2
  38.       set zzz to getAt(zlist, listsub)
  39.       set the castNum of sprite zzz to getAt(rlist, zzz - 6)
  40.       set the foreColor of sprite zzz to 255
  41.       set the backColor of sprite zzz to 0
  42.     end repeat
  43.     updateStage()
  44.   end repeat
  45. end
  46.